package org.libra.events {
	import flash.events.Event;
	
	/**
	 * Libra事件
	 * 包含按钮点击、获取焦点、失去焦点等事件
	 * @author zhangzuoqiang
	 */
	public class LibraEvent extends Event {
		
		/**
		 * 按钮点击事件
		 */
		public static const BTN_CLICKRD:String = "btnClicked";
		
		/**
		 * 组件失去焦点事件
		 */
		public static const GET_FOCUS:String = "getFocus";
		
		/**
		 * 组件获取焦点事件
		 */
		public static const LOST_FOCUS:String = "lostFocus";
		
		public static const CHECK_BOX_CLICKED:String = "checkBoxClicked";
		
		/**
		 * 构造函数
		 * @param	type 事件类型
		 * @param	bubbles 是否冒泡
		 * @param	cancelable
		 */
		public function LibraEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false) { 
			super(type, bubbles, cancelable);
		} 
		
		/**
		 * 得到一个相同的新事件
		 * @return
		 */
		public override function clone():Event { 
			return new LibraEvent(type, bubbles, cancelable);
		} 
		
		/**
		 * 获取string表达式
		 * @return
		 */
		public override function toString():String { 
			return formatToString("LibraEvent", "type", "bubbles", "cancelable", "eventPhase"); 
		}
		
	}
	
}